home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Resources / Burning & Media / GB-PVR 1.2.13 / GBPVR10213.msi / Cabs.w1.cab / VLCUtility.cs438 < prev    next >
Text File  |  2007-04-25  |  28KB  |  804 lines

  1. /// <summary>
  2. /// Summary description for VLCUtility
  3. /// </summary>
  4. /// 
  5. /// 
  6. /// 
  7. /// 
  8.  
  9. namespace gbweb.classes
  10. {
  11.     #region VLC Common Core Class - Class Name - VLCCommon
  12.     
  13.     public class VLCCommon
  14.     {
  15.         #region VLC Common Core Class - Class Name - VLCCommon
  16.         private Settings guideParams;
  17.  
  18.         public string strmPlayer;
  19.         public bool strmExternal;
  20.         public string strmVLCLoc;
  21.         public int strmPort;
  22.         public int strmBuffer;
  23.         public string strmPriority;
  24.         public string strmSetting;
  25.         public int strmBitRate;
  26.         public string strmVideoSizeOpt;
  27.         public string strmVideoSize;
  28.         public string strmVideoScale;
  29.         public string strmMux;
  30.         public string strmVideo;
  31.         public string strmAudio;
  32.         public string strmAudoBitrate;
  33.         public string strmAudioChannels;
  34.         public string strmVEncoder;
  35.         
  36.         public VLCCommon(int profileOption)
  37.         {
  38.             guideParams = Global.Settings;
  39.  
  40.             if (profileOption != 2)
  41.             {
  42.                 strmPlayer = guideParams.strmPlayer;
  43.                 strmExternal = guideParams.strmExternal;
  44.                 
  45.                 strmVLCLoc = guideParams.strmVLCLoc;
  46.                 strmPort = guideParams.strmPort;
  47.                 strmBuffer = guideParams.strmBuffer;
  48.                 strmPriority = guideParams.strmPriority;
  49.                 strmSetting = guideParams.strmSetting;
  50.                 strmBitRate = guideParams.strmBitRate;
  51.                 strmVideoSizeOpt = guideParams.strmVideoSizeOpt;
  52.                 strmVideoSize = guideParams.strmVideoSize;
  53.                 strmVideoScale = guideParams.strmVideoScaleSize;
  54.  
  55.                 strmMux = guideParams.strmMux;
  56.                 strmVideo = guideParams.strmVideo;
  57.                 strmAudio = guideParams.strmAudio;
  58.                 strmAudoBitrate = guideParams.strmAudoBitrate;
  59.                 strmAudioChannels = guideParams.strmAudioChannels;
  60.                 strmVEncoder = guideParams.strmVEncoder;
  61.             }
  62.             else
  63.             {
  64.                 strmPlayer = guideParams.strmPlayer2;
  65.                 strmExternal = guideParams.strmExternal2;
  66.  
  67.                 strmVLCLoc = guideParams.strmVLCLoc2;
  68.                 strmPort = guideParams.strmPort2;
  69.                 strmBuffer = guideParams.strmBuffer2;
  70.                 strmPriority = guideParams.strmPriority2;
  71.                 strmSetting = guideParams.strmSetting2;
  72.                 strmBitRate = guideParams.strmBitRate2;
  73.                 strmVideoSizeOpt = guideParams.strmVideoSizeOpt2;
  74.                 strmVideoSize = guideParams.strmVideoSize2;
  75.                 strmVideoScale = guideParams.strmVideoScaleSize2;
  76.  
  77.                 strmMux = guideParams.strmMux2;
  78.                 strmVideo = guideParams.strmVideo2;
  79.                 strmAudio = guideParams.strmAudio2;
  80.                 strmAudoBitrate = guideParams.strmAudoBitrate2;
  81.                 strmAudioChannels = guideParams.strmAudioChannels2;
  82.                 strmVEncoder = guideParams.strmVEncoder2;  
  83.             }
  84.         }
  85.  
  86.         public VLCCommon(string StrmPlayer, bool StrmExternal, string StrmVLCLoc, int StrmPort, int StrmBuffer, string StrmPriority, string StrmSetting,
  87.                           int StrmBitRate, string StrmVideoSizeOpt, string StrmVideoSize, string StrmVideoScale, string StrmMux, string StrmVideo,
  88.                           string StrmAudio, string StrmAudoBitrate, string StrmAudioChannels, string StrmVEncoder)
  89.         {
  90.             strmPlayer = StrmPlayer;
  91.             strmExternal = StrmExternal;    
  92.             strmVLCLoc = StrmVLCLoc;
  93.             strmPort = StrmPort;
  94.             strmBuffer = StrmBuffer;
  95.             strmPriority = StrmPriority;
  96.             strmSetting = StrmSetting;
  97.             strmBitRate = StrmBitRate;
  98.             strmVideoSizeOpt = StrmVideoSizeOpt;
  99.             strmVideoSize = StrmVideoSize;
  100.             strmVideoScale = StrmVideoScale;
  101.             strmMux = StrmMux;
  102.             strmVideo = StrmVideo;
  103.             strmAudio = StrmAudio;
  104.             strmAudoBitrate = StrmAudoBitrate;
  105.             strmAudioChannels = StrmAudioChannels;
  106.             strmVEncoder = StrmVEncoder;
  107.         }
  108.  
  109.  
  110.         public string getPlayer()
  111.         {
  112.             return strmPlayer;
  113.         }
  114.         public void setPlayer(string a)
  115.         {
  116.             strmPlayer = a;
  117.         }
  118.  
  119.         public bool playerIsExternal()
  120.         {
  121.             return strmExternal;
  122.         }
  123.         public void setPlayerIsExternal(bool a)
  124.         {
  125.             strmExternal = a;
  126.         }
  127.  
  128.         public string getVLCLoc()
  129.         {
  130.             return strmVLCLoc;
  131.         }
  132.         public void setVLCLoc(string a)
  133.         {
  134.             strmVLCLoc = a;
  135.         }
  136.  
  137.         public int getStrmPort()
  138.         {
  139.             return strmPort;
  140.         }
  141.         public void setStmPort(int a)
  142.         {
  143.             strmPort = a;
  144.         }
  145.         
  146.         public int getStrmBuffer()
  147.         {
  148.             return strmBuffer;
  149.         }
  150.         public void setStrmBuffer(int a)
  151.         {
  152.             strmBuffer = a;
  153.         }
  154.  
  155.         public string getStrmPriority()
  156.         {
  157.             return strmPriority;
  158.         }
  159.         public void setStrmPriority(string a)
  160.         {
  161.             strmPriority = a;
  162.         }
  163.  
  164.         public string getStrmSetting()
  165.         {
  166.             return strmSetting;
  167.         }
  168.         public void setStrmSetting(string a)
  169.         {
  170.             strmSetting = a;
  171.         }
  172.  
  173.         public int getStrmBitRate()
  174.         {
  175.             return strmBitRate;
  176.         }
  177.         public void setStrmBitRate(int a)
  178.         {
  179.             strmBitRate = a;
  180.         }
  181.         public string getStrmVideoSizeOpt()
  182.         {
  183.             return strmVideoSizeOpt;
  184.         }
  185.         public void setStrmVideoSizeOpt(string a)
  186.         {
  187.             strmVideoSizeOpt = a;
  188.         }
  189.         public string getStrmVideoSize()
  190.         {
  191.             return strmVideoSize;
  192.         }
  193.         public void setStrmVideoSize(string a)
  194.         {
  195.             strmVideoSize = a;
  196.         }
  197.  
  198.         public string getStrmVideoScale()
  199.         {
  200.             return strmVideoScale;
  201.         }
  202.         public void setStrmVideoScale(string a)
  203.         {
  204.             strmVideoScale = a;
  205.         }
  206.  
  207.         public string getStrmMux()
  208.         {
  209.             return strmMux;
  210.         }
  211.         public void setStrmMux(string a)
  212.         {
  213.             strmMux = a;
  214.         }
  215.  
  216.         public string getStrmVideo()
  217.         {
  218.             return strmVideo;
  219.         }
  220.         public void setStrmVideo(string a)
  221.         {
  222.             strmVideo = a;
  223.         }
  224.  
  225.         public string getStrmAudio()
  226.         {
  227.             return strmAudio;
  228.         }
  229.         public void setStrmAudio(string a)
  230.         {
  231.             strmAudio = a;
  232.         }
  233.  
  234.         public string getStrmAudioBitRate()
  235.         {
  236.             return strmAudoBitrate;
  237.         }
  238.         public void setStrmAudioBitRate(string a)
  239.         {
  240.             strmAudoBitrate = a;
  241.         }
  242.  
  243.         public string getStrmAudioChannels()
  244.         {
  245.             return strmAudioChannels;
  246.         }
  247.         public void setStrmAudioChannels(string a)
  248.         {
  249.             strmAudioChannels = a;
  250.         }
  251.  
  252.         public string getStrmVEncoder()
  253.         {
  254.             return strmVEncoder;
  255.         }
  256.         public void setStrmVEncoder(string a)
  257.         {
  258.             strmVEncoder = a;
  259.         }
  260.     #endregion
  261.         #region VLC Command Line Generation Routines
  262.  
  263.         public string genCommandLine(string filename, string StrmSetting, string vsize, string mux, int bit, int port)
  264.         {
  265.             string args;
  266.             string audioCodec;
  267.  
  268.             switch (StrmSetting)
  269.             {
  270.                 //MP4 Video, MP4 Aduio, MPEG TS Mux
  271.                 case "0":
  272.                     {
  273.                         args = "--intf http \"" + filename + "\" :sout=#transcode{vcodec=mp4v,";
  274.                         audioCodec = "mp4a";
  275.                         mux = "ts";
  276.                         break;
  277.                     }
  278.                 //WM Video, MP4 Audio, MPEG TS Mux
  279.                 case "1":
  280.                     {
  281.                         args = "--intf http \"" + filename + "\" :sout=#transcode{vcodec=WMV2,";
  282.                         audioCodec = "mp4a";
  283.                         mux = "ts";
  284.                         break;
  285.                     }
  286.                 //WM Video, MP3 Audio, ASF Mux
  287.                 case "2":
  288.                     {
  289.                         args = "--intf http \"" + filename + "\" :sout=#transcode{vcodec=WMV2,";
  290.                         audioCodec = "mp3";
  291.                         mux = "asf";
  292.                         break;
  293.                     }
  294.                 //H264 Video, MP4 Audio, MPEG TS Mux
  295.                 case "3":
  296.                     {
  297.                         args = "--intf http \"" + filename + "\" :sout=#transcode{vcodec=h264,";
  298.                         audioCodec = "mp4a";
  299.                         mux = "ts";
  300.                         break;
  301.                     }
  302.                 //MP4 Video, MP1/2 Audio, MPEG TS Mux
  303.                 case "dvs0":
  304.                     {
  305.                         args = "--intf http \"" + filename + "\" :sout=#transcode{vcodec=mp4v,";
  306.                         audioCodec = "mpga";
  307.                         mux = "ts";
  308.                         break;
  309.                     }
  310.                 //MP2 Video, MP1/2 Audio, MPEG TS Mux
  311.                 case "dvs1":
  312.                     {
  313.                         args = "--intf http \"" + filename + "\" :sout=#transcode{vcodec=mp2v,";
  314.                         audioCodec = "mpga";
  315.                         mux = "ts";
  316.                         break;
  317.                     }
  318.                 //MP1 Video, MP1/2 Audio, MPEG TS Mux
  319.                 case "dvs2":
  320.                     {
  321.                         args = "--intf http \"" + filename + "\" :sout=#transcode{vcodec=mp1v,";
  322.                         audioCodec = "mpga";
  323.                         mux = "ts";
  324.                         break;
  325.                     } 
  326.                 //MP4 Video, MP4 Aduio, MPEG TS Mux
  327.                 default:
  328.                     {
  329.                         args = "--intf http \"" + filename + "\" :sout=#transcode{vcodec=mp4v,";
  330.                         audioCodec = "mp4a";
  331.                         mux = "ts";
  332.                         break;
  333.                     }
  334.             }
  335.  
  336.             if (bit == 0)
  337.             {
  338.                 switch (vsize)
  339.                 {
  340.                     case "320":
  341.                         args += "vb=128,width=320,height=213,acodec=" + audioCodec + ",ab=32,channels=2}";
  342.                         break;
  343.                     case "480":
  344.                         args += "vb=128,width=480,height=320,acodec=" + audioCodec + ",ab=32,channels=2}";
  345.                         break;
  346.                     case "720":
  347.                         args += "vb=128,width=720,height=480,acodec=" + audioCodec + ",ab=32,channels=2}";
  348.                         break;
  349.                     default:
  350.                         args += "vb=128,width=320,height=213,acodec=" + audioCodec + ",ab=32,channels=2}";
  351.                         break;
  352.                 }
  353.             }
  354.             else if (bit == 1)
  355.             {
  356.                 switch (vsize)
  357.                 {
  358.                     case "320":
  359.                         args += "vb=256,width=320,height=213,acodec=" + audioCodec + ",ab=32,channels=2}";
  360.                         break;
  361.                     case "480":
  362.                         args += "vb=256,width=480,height=320,acodec=" + audioCodec + ",ab=32,channels=2}";
  363.                         break;
  364.                     case "720":
  365.                         args += "vb=256,width=720,height=480,acodec=" + audioCodec + ",ab=32,channels=2}";
  366.                         break;
  367.                     default:
  368.                         args += "vb=256,width=320,height=213,acodec=" + audioCodec + ",ab=32,channels=2}";
  369.                         break;
  370.                 }
  371.             }
  372.             else if (bit == 2)
  373.             {
  374.                 switch (vsize)
  375.                 {
  376.                     case "320":
  377.                         args += "vb=512,width=320,height=213,acodec=" + audioCodec + ",ab=32,channels=2}";
  378.                         break;
  379.                     case "480":
  380.                         args += "vb=512,width=480,height=320,acodec=" + audioCodec + ",ab=32,channels=2}";
  381.                         break;
  382.                     case "720":
  383.                         args += "vb=512,width=720,height=480,acodec=" + audioCodec + ",ab=32,channels=2}";
  384.                         break;
  385.                     default:
  386.                         args += "vb=512,width=320,height=213,acodec=" + audioCodec + ",ab=32,channels=2}";
  387.                         break;
  388.                 }
  389.             }
  390.             else if (bit == 3)
  391.             {
  392.                 switch (vsize)
  393.                 {
  394.                     case "320":
  395.                         args += "vb=1200,width=320,height=213,acodec=" + audioCodec + ",ab=32,channels=2}";
  396.                         break;
  397.                     case "480":
  398.                         args += "vb=1200,width=480,height=320,acodec=" + audioCodec + ",ab=32,channels=2}";
  399.                         break;
  400.                     case "720":
  401.                         args += "vb=1200,width=720,height=480,acodec=" + audioCodec + ",ab=32,channels=2}";
  402.                         break;
  403.                     default:
  404.                         args += "vb=1200,width=320,height=213,acodec=" + audioCodec + ",ab=32,channels=2}";
  405.                         break;
  406.                 }
  407.             }
  408.             else
  409.             {
  410.                 switch (vsize)
  411.                 {
  412.                     case "320":
  413.                         args += "vb=128,width=320,height=213,acodec=" + audioCodec + ",ab=32,channels=2}";
  414.                         break;
  415.                     case "480":
  416.                         args += "vb=128,width=480,height=320,acodec=" + audioCodec + ",ab=32,channels=2}";
  417.                         break;
  418.                     case "720":
  419.                         args += "vb=128,width=720,height=480,acodec=" + audioCodec + ",ab=32,channels=2}";
  420.                         break;
  421.                     default:
  422.                         args += "vb=128,width=320,height=213,acodec=" + audioCodec + ",ab=32,channels=2}";
  423.                         break;
  424.                 }
  425.             }
  426.  
  427.             //Append more info to the argument line being passed to VLC on the server
  428.             args += ":standard{access=http,mux=" + mux + ",url=:" + port + "} vlc:quit";
  429.  
  430.             return (args);
  431.         }
  432.         
  433.         public string genCommandLine(string filename, VLCCommon vlc)
  434.         {
  435.             string args = "--intf http \"" + filename + "\" :sout=#transcode{vcodec=" + vlc.getStrmVideo()+ ",";
  436.  
  437.             args = setVideo(args, vlc);
  438.  
  439.             //Append more info to the argument line being passed to VLC on the server
  440.             args += ":standard{access=http,mux=" + vlc.getStrmMux() + ",url=:" + vlc.getStrmPort() + "} vlc:quit";
  441.             
  442.             return args;
  443.             
  444.         }
  445.  
  446.         public string genCommandLine(string filename, VLCCommon vlc, object vencoder)
  447.         {
  448.             string args = "--intf http \"" + filename + "\" :sout=#transcode{vcodec=" + vlc.getStrmVideo();
  449.             string encargs = "";
  450.             if (vencoder is H264Encoder)
  451.             {
  452.                 H264Encoder H264 = (H264Encoder) vencoder;
  453.                 encargs = "{";
  454.                 if (H264.getH264KeyInt() != string.Empty)
  455.                 {
  456.                     encargs = encargs + "keyint=" + H264.getH264KeyInt()+ ",";
  457.                 }
  458.                 if (H264.getH264IDRInt() != string.Empty)
  459.                 {
  460.                     encargs = encargs + "idrint=" + H264.getH264IDRInt() + ",";
  461.                 }
  462.                 if (H264.getH264BFrames() != string.Empty)
  463.                 {
  464.                     encargs = encargs + "bframes=" + H264.getH264BFrames() + ",";
  465.                 }
  466.                 if (H264.getH264QuantizerParam() != string.Empty)
  467.                 {
  468.                     encargs = encargs + "qp=" + H264.getH264QuantizerParam() + ",";
  469.                 }
  470.                 if (H264.getH264QuantizerMax() != string.Empty)
  471.                 {
  472.                     encargs = encargs + "qp-max=" + H264.getH264QuantizerMax() + ",";
  473.                 }
  474.                 if (H264.getH264QuantizerMin() != string.Empty)
  475.                 {
  476.                     encargs = encargs + "qp-min=" + H264.getH264QuantizerMin() + ",";
  477.                 }
  478.                 if (!H264.getH264CABAC())
  479.                 {
  480.                     encargs = encargs + "cabac=no-cabac,";
  481.                 }
  482.                 if (!H264.getH264LoopFilter())
  483.                 {
  484.                     encargs = encargs + "loopfilter=nf,";
  485.                 }
  486.                 if (!H264.getH264Analyse())
  487.                 {
  488.                     encargs = encargs + "analyse=none,";
  489.                 }
  490.                 if (H264.getH264FrameRef() != string.Empty)
  491.                 {
  492.                     encargs = encargs + "frameref=" + H264.getH264FrameRef() + ",";
  493.                 }
  494.                 if (H264.getH264Adapt() != string.Empty)
  495.                 {
  496.                     encargs = encargs + "adapt=" + H264.getH264Adapt() + ",";
  497.                 }
  498.                 if (H264.getH264Me() != string.Empty)
  499.                 {
  500.                     encargs = encargs + "me=" + H264.getH264Me() + ",";
  501.                 }
  502.                 if (H264.getH264SubME() != string.Empty)
  503.                 {
  504.                     encargs = encargs + "subme=" + H264.getH264SubME() + ",";
  505.                 }
  506.                 if (H264.getH264ChromaME() != string.Empty)
  507.                 {
  508.                     encargs = encargs + "chroma-me=" + H264.getH264ChromaME() + ",";
  509.                 }
  510.                 if (H264.getH264MERange() != string.Empty)
  511.                 {
  512.                     encargs = encargs + "merange=" + H264.getH264MERange() + ",";
  513.                 }
  514.                 encargs = encargs + "}";
  515.             }
  516.  
  517.             args = args + encargs + ",";
  518.  
  519.             args = setVideo(args, vlc);
  520.  
  521.             //Append more info to the argument line being passed to VLC on the server
  522.             args += ":standard{access=http,mux=" + vlc.getStrmMux() + ",url=:" + vlc.getStrmPort() + "} vlc:quit";
  523.  
  524.             return args;
  525.         }
  526.  
  527.         private static string setVideo(string args, VLCCommon vlc)
  528.         {
  529.             //Set the variables for bitrate and video size
  530.             int bit = vlc.getStrmBitRate();
  531.             string vsize;
  532.             if (vlc.getStrmVideoSizeOpt() == "preset")
  533.             {
  534.                 vsize = vlc.getStrmVideoSize();
  535.                 switch (vsize)
  536.                 {
  537.                     case "320":
  538.                         vsize = "width=320,height=213";
  539.                         break;
  540.                     case "480":
  541.                         vsize += "width=480,height=320";
  542.                         break;
  543.                     case "720":
  544.                         vsize += "width=720,height=480";
  545.                         break;
  546.                     default:
  547.                         vsize += "width=320,height=213";
  548.                         break;
  549.                 }
  550.             }
  551.             else
  552.             {
  553.                 vsize = "scale=" + vlc.getStrmVideoScale();
  554.             }
  555.  
  556.             if (bit == 0)
  557.             {
  558.                 args += "vb=128," + vsize + ",acodec=" + vlc.getStrmAudio() + ",ab=" + vlc.getStrmAudioBitRate() + ",channels=" + vlc.getStrmAudioChannels() + "}";
  559.             }
  560.             else if (bit == 1)
  561.             {
  562.                 args += "vb=256," + vsize + ",acodec=" + vlc.getStrmAudio() + ",ab=" + vlc.getStrmAudioBitRate() + ",channels=" + vlc.getStrmAudioChannels() + "}";
  563.             }
  564.             else if (bit == 2)
  565.             {
  566.                 args += "vb=512," + vsize + ",acodec=" + vlc.getStrmAudio() + ",ab=" + vlc.getStrmAudioBitRate() + ",channels=" + vlc.getStrmAudioChannels() + "}";
  567.             }
  568.             else if (bit == 3)
  569.             {
  570.                 args += "vb=1200," + vsize + ",acodec=" + vlc.getStrmAudio() + ",ab=" + vlc.getStrmAudioBitRate() + ",channels=" + vlc.getStrmAudioChannels() + "}";
  571.             }
  572.             else
  573.             {
  574.                 args += "vb=128," + vsize + ",acodec=" + vlc.getStrmAudio() + ",ab=" + vlc.getStrmAudioBitRate() + ",channels=" + vlc.getStrmAudioChannels() + "}";
  575.             }
  576.             return args;
  577.         }
  578.         #endregion
  579.     }
  580.     #endregion
  581.  
  582.     #region H264 Encoder Settings Class - Class Name = H264Encoder
  583.     public class H264Encoder
  584.     {
  585.         private Settings guideParams;
  586.         
  587.         public string strmH264KeyInt;
  588.         public string strmH264IDRInt;
  589.         public string strmH264BFrames;
  590.         public string strmH264QuantizerParam;
  591.         public string strmH264QuantizerMax;
  592.         public string strmH264QuantizerMin;
  593.         public bool strmH264CABAC;
  594.         public bool strmH264LoopFilter;
  595.         public bool strmH264Analyse;
  596.         public string strmH264FrameRef;
  597.         public string strmH264Adapt;
  598.         public string strmH264Me;
  599.         public string strmH264SubME;
  600.         public string strmH264ChromaME;
  601.         public string strmH264MERange;
  602.         
  603.         public H264Encoder(int profileOption)
  604.         {
  605.             guideParams = Global.Settings;
  606.  
  607.             if (profileOption != 2)
  608.             {
  609.                 strmH264KeyInt = guideParams.strmH264KeyInt;
  610.                 strmH264IDRInt = guideParams.strmH264IDRInt;
  611.                 strmH264BFrames = guideParams.strmH264BFrames;
  612.                 strmH264QuantizerMax = guideParams.strmH264QuantizerParam;
  613.                 strmH264QuantizerMax = guideParams.strmH264QuantizerMax;
  614.                 strmH264QuantizerMin = guideParams.strmH264QuantizerMin;
  615.                 strmH264CABAC = guideParams.strmH264CABAC;
  616.                 strmH264LoopFilter = guideParams.strmH264LoopFilter;
  617.                 strmH264Analyse = guideParams.strmH264Analyse;
  618.                 strmH264FrameRef = guideParams.strmH264FrameRef;
  619.                 strmH264Adapt = guideParams.strmH264Adapt;
  620.                 strmH264Me = guideParams.strmH264Me;
  621.                 strmH264SubME = guideParams.strmH264SubME;
  622.                 strmH264ChromaME = guideParams.strmH264ChromaME;
  623.                 strmH264MERange = guideParams.strmH264MERange;
  624.             }
  625.             else
  626.             {
  627.                 strmH264KeyInt = guideParams.strmH264KeyInt2;
  628.                 strmH264IDRInt = guideParams.strmH264IDRInt2;
  629.                 strmH264BFrames = guideParams.strmH264BFrames2;
  630.                 strmH264QuantizerMax = guideParams.strmH264QuantizerParam2;
  631.                 strmH264QuantizerMax = guideParams.strmH264QuantizerMax2;
  632.                 strmH264QuantizerMin = guideParams.strmH264QuantizerMin2;
  633.                 strmH264CABAC = guideParams.strmH264CABAC2;
  634.                 strmH264LoopFilter = guideParams.strmH264LoopFilter2;
  635.                 strmH264Analyse = guideParams.strmH264Analyse2;
  636.                 strmH264FrameRef = guideParams.strmH264FrameRef2;
  637.                 strmH264Adapt = guideParams.strmH264Adapt2;
  638.                 strmH264Me = guideParams.strmH264Me2;
  639.                 strmH264SubME = guideParams.strmH264SubME2;
  640.                 strmH264ChromaME = guideParams.strmH264ChromaME2;
  641.                 strmH264MERange = guideParams.strmH264MERange2; 
  642.             }
  643.         }
  644.  
  645.         public H264Encoder(string StrmH264KeyInt, string StrmH264IDRInt, string StrmH264BFrames, string StrmH264QuantizerParam, string StrmH264QuantizerMax,
  646.                             string StrmH264QuantizerMin, bool StrmH264CABAC, bool StrmH264LoopFilter, bool StrmH264Analyse,
  647.                             string StrmH264FrameRef, string StrmH264Adapt, string StrmH264Me, string StrmH264SubME,
  648.                             string StrmH264ChromaME, string StrmH264MERange)
  649.         {
  650.             strmH264KeyInt = StrmH264KeyInt;
  651.             strmH264IDRInt = StrmH264IDRInt;
  652.             strmH264BFrames = StrmH264BFrames;
  653.             strmH264QuantizerMax = StrmH264QuantizerParam;
  654.             strmH264QuantizerMax = StrmH264QuantizerMax;
  655.             strmH264QuantizerMin = StrmH264QuantizerMin;
  656.             strmH264CABAC = StrmH264CABAC;
  657.             strmH264LoopFilter = StrmH264LoopFilter;
  658.             strmH264Analyse = StrmH264Analyse;
  659.             strmH264FrameRef = StrmH264FrameRef;
  660.             strmH264Adapt = StrmH264Adapt;
  661.             strmH264Me = StrmH264Me;
  662.             strmH264SubME = StrmH264SubME;
  663.             strmH264ChromaME = StrmH264ChromaME;
  664.             strmH264MERange = StrmH264MERange;
  665.         }
  666.  
  667.         public string getH264KeyInt()
  668.         {
  669.             return strmH264KeyInt;
  670.         }
  671.         public void setH264KeyInt(string a)
  672.         {
  673.             strmH264KeyInt = a;
  674.         }
  675.  
  676.         public string getH264IDRInt()
  677.         {
  678.             return strmH264IDRInt;
  679.         }
  680.         public void setH264IDRInt(string a)
  681.         {
  682.             strmH264IDRInt = a;
  683.         }
  684.  
  685.         public string getH264BFrames()
  686.         {
  687.             return strmH264BFrames;
  688.         }
  689.         public void setH264BFrames(string a)
  690.         {
  691.             strmH264BFrames = a;
  692.         }
  693.  
  694.         public string getH264QuantizerParam()
  695.         {
  696.             return strmH264QuantizerParam;
  697.         }
  698.         public void setH264QuantizerParam(string a)
  699.         {
  700.             strmH264QuantizerMax = a;
  701.         }
  702.  
  703.         public string getH264QuantizerMax()
  704.         {
  705.             return strmH264QuantizerMax;
  706.         }
  707.         public void setH264QuantizerMax(string a)
  708.         {
  709.             strmH264QuantizerMax = a;
  710.         }
  711.  
  712.         public string getH264QuantizerMin()
  713.         {
  714.             return strmH264QuantizerMin;
  715.         }
  716.         public void setH264QuantizerMin(string a)
  717.         {
  718.             strmH264QuantizerMin = a;
  719.         }
  720.  
  721.         public bool getH264CABAC()
  722.         {
  723.             return strmH264CABAC;
  724.         }
  725.         public void setH264CABAC(bool a)
  726.         {
  727.             strmH264CABAC = a;
  728.         }
  729.  
  730.         public bool getH264LoopFilter()
  731.         {
  732.             return strmH264LoopFilter;
  733.         }
  734.         public void setH264LoopFilter(bool a)
  735.         {
  736.             strmH264LoopFilter = a;
  737.         }
  738.  
  739.         public bool getH264Analyse()
  740.         {
  741.             return strmH264Analyse;
  742.         }
  743.         public void setH264Analyse(bool a)
  744.         {
  745.             strmH264Analyse = a;
  746.         }
  747.  
  748.         public string getH264FrameRef()
  749.         {
  750.             return strmH264FrameRef;
  751.         }
  752.         public void setH264FrameRef(string a)
  753.         {
  754.             strmH264FrameRef = a;
  755.         }
  756.  
  757.         public string getH264Adapt()
  758.         {
  759.             return strmH264Adapt;
  760.         }
  761.         public void setH264Adapt(string a)
  762.         {
  763.             strmH264Adapt = a;
  764.         }
  765.  
  766.         public string getH264Me()
  767.         {
  768.             return strmH264Me;
  769.         }
  770.         public void setH264Me(string a)
  771.         {
  772.             strmH264Me = a;
  773.         }
  774.  
  775.         public string getH264SubME()
  776.         {
  777.             return strmH264SubME;
  778.         }
  779.         public void setH264SubME(string a)
  780.         {
  781.             strmH264SubME = a;
  782.         }
  783.  
  784.         public string getH264ChromaME()
  785.         {
  786.             return strmH264ChromaME;
  787.         }
  788.         public void setH264ChromaME(string a)
  789.         {
  790.             strmH264ChromaME = a;
  791.         }
  792.  
  793.         public string getH264MERange()
  794.         {
  795.             return strmH264MERange;
  796.         }
  797.         public void setH264MERange(string a)
  798.         {
  799.             strmH264MERange = a;
  800.         }
  801.     }
  802.     #endregion
  803. }
  804.